package cn.cau.epidemicsurveysystem.dao;

import cn.cau.epidemicsurveysystem.bean.QuestionAnsBean;
import org.springframework.data.jpa.repository.JpaRepository;

import java.sql.Timestamp;
import java.util.List;

public interface QuestionAnsRepository extends JpaRepository<QuestionAnsBean,Integer> {
    QuestionAnsBean findQuestionAnsBeanByQuestionIdEqualsAndPatientIdEqualsAndDateEquals(int questionId, int patientId, Timestamp date);

    QuestionAnsBean findQuestionAnsBeanByQuestionIdEqualsAndMissionIdEquals(int questionId,int missionId);

    QuestionAnsBean save(QuestionAnsBean ans);

    List<QuestionAnsBean> findQuestionAnsBeansByMissionIdOrderByQuestionId(int missionId);
}
